﻿@model IPagedList<SketchTour.Models.MSHT00Models>
@using SketchTour.Paging;
@using Resources;
<div style="overflow: auto; width: 100%" >
        <table class="data-table" style="width: 1300px;" id="tableData">
            <tbody>
                <tr bgcolor="D8E6FC">
                    <th style="text-align: center;" scope="col" class="th10">
                        <input type="checkbox" value="" class="classCheck" id="chkAllItem" onclick="selectAll()" />
                    </th>
                    <th style="text-align: center;" scope="col" class="th200">
                        @Resource.MSHT00_SCR_lblName
                    </th>
                    <th style="text-align: center;" scope="col" class="th100">
                         @Resource.MSHT00_SCR_lblServiceType
                    </th>
                    <th style="text-align: center;" scope="col" class="th100">
                        @Resource.MSHT00_SCR_lblCity
                    </th>
                    <th style="text-align: center;" scope="col" class="th200">
                          @Resource.MSHT00_SCR_lblAddress
                    </th>
                    <th style="text-align: center;" scope="col" class="th100">
                          @Resource.MSHT00_SCR_lblTel
                    </th>
                    <th style="text-align: center;" scope="col" class="th100">
                          @Resource.MSHT00_SCR_lblFax
                    </th>
                    <th style="text-align: center;" scope="col" class="th100">
                          @Resource.MSHT00_SCR_lblEmail
                    </th>
                    <th style="text-align: center;" scope="col" class="th200">
                          @Resource.MSHT00_SCR_lblNote
                    </th>
                </tr>
                @if (Model != null)
                {
                    foreach (var item in Model)
                    {
                    
                    <tr>
                        <td style="text-align: center;">
                            @Html.CheckBox("IdDetail_" + @item.ID, false, new { onclick = "selectItem('IdDetail_" + @item.ID + "')" })
                        </td>
                        <td style="text-align: left;">
                            @Html.DisplayFor(modelItem => item.Name)
                        </td>
                        <td style="text-align: left;">
                            @Html.DisplayFor(modelItem => item.ServiceName)
                        </td>
                        <td style="text-align: left;">
                            @Html.DisplayFor(modelItem => item.CityName)
                        </td>
                        <td style="text-align: left;">@Html.DisplayFor(modelItem => item.Address)
                        </td>
                        <td style="text-align: left;">@Html.DisplayFor(modelItem => item.Tel)
                        </td>
                        <td style="text-align: left;">@Html.DisplayFor(modelItem => item.Fax)
                        </td>
                        <td style="text-align: left;">@Html.DisplayFor(modelItem => item.Email)
                        </td>
                        <td style="text-align: left;">@Html.DisplayFor(modelItem => item.Note)
                        </td>
                    </tr>
                    }
                }
            </tbody>
        </table>
    </div>
    <div>
    </div>
    <div class="pager">
        @if (Model != null)
        {
            @Html.Raw(Ajax.Pager(new AjaxOptions
       {
           UpdateTargetId = "divList",
           OnBegin = "beginPaging",
           OnSuccess = "successPaging",
           OnFailure = "failurePaging",
           InsertionMode = InsertionMode.Replace,
           HttpMethod = "POST"

       }, ViewData.Model.PageSize, ViewData.Model.PageNumber,
                                       ViewData.Model.TotalItemCount, new
                                       {
                                           controller = "MSHT00",
                                           action = "Index"

                                       }))
        }
    </div>